Skip to content

EMPulseCannon.InaccurateRadius for projectiles in EMPulseCannon=yes superweapons and Ammo support - #1698

Open
FS-21 wants to merge 13 commits into
Phobos-developers:developfrom
FS-21:feature/new_EMPulseCannon_additions
Open

EMPulseCannon.InaccurateRadius for projectiles in EMPulseCannon=yes superweapons and Ammo support#1698
FS-21 wants to merge 13 commits into
Phobos-developers:developfrom
FS-21:feature/new_EMPulseCannon_additions

Conversation

@FS-21

@FS-21 FS-21 commented Jun 4, 2025

Copy link
Copy Markdown
Contributor
  • Buildings with EMPulseCannon=true & Ammo now fire repeatedly until the weapon no longer has enough ammo.
  • EMPulseCannon.InaccurateRadius defines an area around the target location where the projectile can land randomly.

In rulesmd.ini:

[PROJECTILE]                 ; Projectile
EMPulseCannon.InaccurateRadius=0 ; integer

@FS-21

FS-21 commented Jun 4, 2025

Copy link
Copy Markdown
Contributor Author

Keep in mind Innacurate and other tags doesn't work well in superweapons that needs to fire very long distances. This example was with radius 6 and the structure has Ammo=5 set (I fired it near for the GIF recording but is the same at very long distances).

cabal_sw1_demo_01

@github-actions

github-actions Bot commented Jun 4, 2025

Copy link
Copy Markdown

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Coronia

Coronia commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Think it would be better to add an extra tag on the weapon or superweapon to control its maximum shot too, which could allow some more customization. E.g. an EMPulseCannon that can only fire once at a time, but has multiple charges after reloading more ammo

@Coronia Coronia added Tested ⚙️T1 T1 maintainer review is sufficient labels Jun 5, 2025
@FS-21

FS-21 commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

But all is already controlled by the Ammo tags in Building and in Weapon and if I'm not wrong these structures are pacific/dumb unless the attached EMP Superweapon is used.
Currently I checked that works the "ElitePrimary=" so you can have for example:

[Some_EMPCannon_Building]
Ammo=22
Primary=Weapon01
ElitePrimary=Weapon01E
Trainable=yes

[Weapon01]
...
Ammo=5

[Weapon01E]
...
Ammo=2

If the building promotes to Elite the weapon Ammo used by the SW is reduced from 5 (4 shots in total and 2 of Ammo not used) to 2 (11 shots in total).

So I don't understand the use-case of the suggestion. More if the building can use the EmptyReloadAmount, EmptyReload and Reload tags :-/
Or by "maximum shot" are you talking about reusing the Burst tag in Weapons (in addition to Ammo usage)...
Please, can you explain better if I missed something in your example?

@Coronia

Coronia commented Jun 8, 2025

Copy link
Copy Markdown
Contributor

something like this:

[SOMESW]
RechargeTime=0.01
MaxShot=1

[SOMEBUILDING]
Ammo=6
Reload=900

so this SW doesn't need to recharge, but can't work when there's no ammo. Instead, it'll gain a 'virtual charge' thanks to ammo reload in every minute, up to 6 charge. So in the 6th minutes you can use it for 6 times continuously on different positions

@FS-21

FS-21 commented Jun 8, 2025

Copy link
Copy Markdown
Contributor Author

If I understood the example, instead of using the same weapon's ammo for consuming the structure's ammo (and limiting the number of shots of that SW instance) a new variable should be created to control the number of shots (as a counter) until the max number of shots is reached for that SW instance (and each SW instance I clicked comsumes 1 ammo).
And then leave the structure's ammo for knowing how many instances this structure's SW can fire a EMPCannon?

Also, Ares has some tags with a similar name (shots or similar) so for avoiding confussion should be something like [SomeSW] -> EMPulseCannon.MaxShots or a better name.

Also, I thing a new label in the sidebar description tooltip should show the current available SW shots (the structure's ammo).

If I'm not wrong from your example I need to backport a SW method rewrite I added in the Battle points PR for checking in the SW is ready to be fired (and that AI obeys) and include checks for EMPCannon ammo and maybe other small checks now I can't see yet.

@Starkku
Starkku force-pushed the develop branch 2 times, most recently from b429215 to 280b1c8 Compare June 29, 2025 19:13
FS-21 and others added 3 commits August 7, 2025 16:47
# Conflicts:
#	CREDITS.md
#	docs/Whats-New.md
#	src/Ext/Building/Body.cpp
#	src/Ext/Building/Body.h
#	src/Ext/BulletType/Body.cpp
#	src/Ext/BulletType/Body.h
Comment thread src/Ext/Techno/Hooks.Firing.cpp Outdated
Comment thread docs/New-or-Enhanced-Logics.md Outdated
@FS-21

FS-21 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Uploaded the new tested version. I rejected the ammo idea, created a burst tag and it can pause & resume shots if the structure is offline/online.

@FS-21
FS-21 requested a review from TaranDahl August 22, 2026 12:41
@fagonghaiwo

fagonghaiwo commented Aug 22, 2026

Copy link
Copy Markdown

boom when
[WallbusterP]
EMPulseCannon.InaccurateRadius=5
Eip:007564B4

my fault, I forget image

@fagonghaiwo

Copy link
Copy Markdown
10952b902abfe5d3fb4932ac4e9f7e47

need doc

@FS-21

FS-21 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author
image not related to this feature.

@Coronia Coronia removed the Tested label Aug 25, 2026
…eCannon_additions

# Conflicts:
#	docs/Whats-New.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs improvement Needs testing ⚙️T1 T1 maintainer review is sufficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants